import React, { useState } from 'react'

const Foo: React.FC = () => {
	// 初始值为number类型0, count为number类型
	let [count, setCount] = useState(0)

	const addcount = () => {
		setCount((count += 1))
	}

	return (
		<>
			<button onClick={addcount}>B:count++ =&gt; {count}</button>
		</>
	)
}
export default Foo
